<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta content="text/html;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta http-equiv ="Pragma" content = "no-cache"/>
	<meta http-equiv="Cache-Control" content="no cache" />
	<meta http-equiv="Expires" content="0" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="format-detection" content="telephone=no"/>
	<script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
	<link href="https://cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="/static/fsLayui-1.8.2/plugins/layui/css/layui.css" media="all"/>
	<link rel="stylesheet" type="text/css" href="/static/fsLayui-1.8.2/css/fs.css" media="all"/>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/fsDict.js?v=1.5.0"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/fs.js?v=1.5.0"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/frame.js?v=1.5.0"></script>
</head>
<body>
   <div class="layui-fluid">
  <div class="layui-row layui-col-space1">
  	 <div class="layui-col-md12">
  	 	<div class="layui-row grid-demo">
	      <div class="layui-col-md3">
        	<button class="layui-btn" function="top" topUrl="/admin/notice/one.html" topMode="add" topWidth="800px" topHeight="600px" topTitle="新增公告">
			  <i class="layui-icon">&#xe654;</i>新增
			</button>
			<button class="layui-btn layui-btn-danger" function="submit" url="/admin/notice/delete" isMutiDml="1" isConfirm="1" confirmMsg="是否确定删除选中的数据？" inputs="noticeId:">
			  <i class="layui-icon">&#xe640;</i>批量删除
			</button>
			<button class="layui-btn" function="refresh">
			  <i class="layui-icon">&#x1002;</i>刷新
			</button>
	      </div>
	      <div class="layui-col-md12">
	         <table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" isLoad="1" url="/admin/notice/list" isPage="1" defaultForm="query_form" height="full-135"></table>

	         <div class="fsDatagridCols">
	         	<p type="numbers" title="#"/>
				<p checkbox="true"/>
			    <p field="noticeId" align="center" title="公告ID" sort="true"/>
			    <p field="content" align="center" title="公告内容" sort="true" />
			    <p field="grade" align="center" title="等级" sort="true" templet="#gradeTpl" />
			    <p field="publishDate" align="center" title="发布日期" sort="true" />
			    <p fixed="right" align="center" toolbar="#barDemo" title="操作"/>
			</div>
			
			<script type="text/html" id="gradeTpl">
				{{#  if(d.grade == 0){ }}
  			    	<span class="layui-badge layui-bg-red" style="undefined">重要</span>
				{{# } else if(d.grade == 1){ }}
					<span class="layui-badge layui-bg-white" style="undefined">一般</span>
 				{{#  } }}
			</script>
			
			<script type="text/html" id="barDemo">
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="/admin/notice/one.html" topMode="readonly" topWidth="800px" topHeight="600px" topTitle="查看公告" inputs="noticeId:">查看</a>
 				<a class="layui-btn layui-btn-xs" lay-event="top" topUrl="/admin/notice/one.html" topMode="edit" topWidth="800px" topHeight="600px" topTitle="编辑公告" inputs="noticeId:">编辑</a>
  				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="/admin/notice/delete" isConfirm="1" confirmMsg="是否确定删除当前记录？" inputs="noticeId:">删除</a>
			</script>
	      </div>
	    </div>

  	 </div>

  </div>
</div>
</body>
</html>
